
public class Test {

    public static void main(String args[]) {
        
        final Database database = new Database();
        
        final Writer writerProcess = new Writer(database);
        final Reader readerProcess1 = new Reader(database, 1);
        final Reader readerProcess2 = new Reader(database, 2);
        final Reader readerProcess3 = new Reader(database, 3);
        
        writerProcess.start();
        readerProcess1.start();
        readerProcess2.start();
        readerProcess3.start();
    }
}
